<template>
  <div id="root">
    <h1>引出生命周期</h1>
    <h2 v-if="a">你好啊</h2>
    <h2 :style="{opacity}">欢迎学习Vue</h2>
  </div>
</template>

<script>
export default {
  name: "YinChuShengMingZhouQi",
  data() {
    return {
      a: false,
      opacity:1
    }
  },
  mounted() {
    console.log('mount', this)
    console.log('mounted')
    setInterval(() =>{
      this.opacity -= 0.01
      if (this.opacity <= 0) this.opacity = 1
    },16)
  },
}
</script>

<style scoped>

</style>
